package com.example.camera2demo;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.camera2demo.camera2basic.CameraActivity;

import androidx.appcompat.app.AppCompatActivity;

public class StartActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);
    }

    public void toRecordVideo(View view) {
        Intent intent = new Intent(this, CameraActivity.class);
        intent.putExtra("pageIndex",0);
        startActivity(intent);
    }

    public void toTakePhoto(View view) {
        Intent intent = new Intent(this, CameraActivity.class);
        intent.putExtra("pageIndex",1);
        startActivity(intent);
    }
}
